package com.rahwi.rahwi_server.Controller;
import com.rahwi.rahwi_server.Service.impl.LoginService;
import com.rahwi.rahwi_server.vo.params.LoginParams;
import com.rahwi.rahwi_server.vo.results.ActionResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName LoginController
 * @Description
 * @Date 2021/12/12 14:29
 * @Autor mjw
 * @Version 1.0
 */

@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    LoginService loginService;

    @PostMapping("/user")
    public ActionResult login(@RequestBody LoginParams loginParams){
        return loginService.checkLogin(loginParams);
    }

}
